/**
 * Copyright(c) 2013 Jade Techonologies Co., Ltd.
 *
 * History:
 *   13-4-14 下午3:44 Created by dwzhang
 */
package com.jade.framework.base.criterion;

import java.io.Serializable;

/**
 * 实体对象，包含实体的简单名称、实体别名等.
 *
 * @author dwzhang
 * @version 1.0 13-4-14 下午3:44
 */
public class QueryEntity implements Serializable
{
    /** 实体类对象的SimpleName */
    private final String entityName;

    /** 实体对象的别名 */
    private final String alias;

    /** join 方式 */
    private String join;

    /**
     * Constructor
     *
     * @param entityName 实体类名
     * @param alias      实体别名
     */
    public QueryEntity(String entityName, String alias)
    {
        this.entityName = entityName;
        this.alias = alias;
    }

    public QueryEntity(String join, String entityName, String alias)
    {
        this.join = join;
        this.entityName = entityName;
        this.alias = alias;
    }

    /**
     * 返回实体类对象的SimpleName.
     *
     * @return 实体类对象的SimpleName
     */
    public String getEntityName()
    {
        return entityName;
    }

    /**
     * 获取实体对象的别名.
     *
     * @return 实体对象的别名
     */
    public String getAlias()
    {
        return alias;
    }

    public String getJoin()
    {
        return join;
    }

    public void setJoin(String join)
    {
        this.join = join;
    }
}
